project(
  login_appfwk
  LANGUAGES CXX
)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_AUTOUIC_SEARCH_PATHS (ui))
find_package(Qt5 COMPONENTS Widgets Core REQUIRED)

add_definitions(-DQLS_LOGIN_APPFWK_LIBRARY)

set(_srcs
    src/qls_login_appfwk.cpp
)

set(_headers
    include/login_appfwk/qls_login_appfwk.h
    include/login_appfwk/qls_login_appfwk_global.h
)

set(_ui
    ui/qls_login_appfwk.ui
)

add_library(login_appfwk SHARED ${_srcs} ${_headers} ${_ui})
target_link_libraries(login_appfwk PUBLIC
    db_manager
    Qt5::Widgets Qt5::Core ${CMAKE_THREAD_LIBS_INIT}
)
target_link_libraries(login_appfwk PRIVATE settings)
target_include_directories(login_appfwk PUBLIC include)
